import { request } from '@/utils/request';
/**
 * 
 * @param data 获取公共岗位列表 
 * @returns 
 */
export function pubStationListPage(data) {
    return request({
      url: '/api/orgm/pubStationListPage',
      method: 'post',
      data,
    });
  }
  export function getPostTypeEntityList(data) {
    return request({
      url: '/api/orgm/getPostTypeEntityList',
      method: 'post',
      data,
    });
  }
  export function getPubStationListByUser(data) {
    return request({
      url: '/api/orgm/getPubStationListByUser',
      method: 'get',
      params:data,
    });
  }
  /**
   * @description 删除公共岗位
   * @returns
   */
  export function deletePubStation(data: any) {
    return request(
      {
        url: '/api/orgm/deletePubStation',
        method: 'post',
        data,
      },
      {
        successMsg: '删除成功',
      },
    );
  }
  export function deletePostType(data: any) {
    return request(
      {
        url: '/api/orgm/deletePostType',
        method: 'post',
        data,
      },
      {
        successMsg: '删除成功',
      },
    );
  }
  /**
   * @description 创建公共岗位
   * @returns
   */
  export function createPubStation(data) {
    return request({
      url: '/api/orgm/addPubStation',
      method: 'post',
      data,
    });
  }
  export function addPostType(data) {
    return request({
      url: '/api/orgm/addPostType',
      method: 'post',
      data,
    });
  }
  
  // 更新公共岗位
  export function updatePubStation(data) {
    return request({
      url: '/api/orgm/updatePubStation',
      method: 'post',
      data,
    });
  }
  export function updataPostType(data) {
    return request({
      url: '/api/orgm/updataPostType',
      method: 'post',
      data,
    });
  }